﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;

namespace Managistics.Model.Mappings
{
    public class InputSheetOtherDetailMap : ClassMap<InputSheetOtherDetail>
    {

        public InputSheetOtherDetailMap()
        {
            Schema(Constants._tblSchema);
            Table(Constants._tblInputSheetOtherDetail);
            LazyLoad();

            Id(x => x.Id).GeneratedBy.Identity().Column("Id");

            References(x => x.Inputsheetothers).Column("InputSheetOtherId");
            References(x => x.Good).Column("GoodCode");

            Map(x => x.GoodName).Column("GoodName").Not.Nullable().Length(300);
            Map(x => x.CurrentPrice).Column("CurrentPrice").Precision(53);
            Map(x => x.Quantity).Column("Quantity").Not.Nullable().Precision(10);
            Map(x => x.Note).Column("Note");
        }
    }
}
